{% extends 'base.html' %}

{% block title %}登录{% endblock %}

{% block content %}
<div class="container py-5">
    <div class="row justify-content-center">
        <div class="col-md-6">
            <div class="card shadow">
                <div class="card-body p-5">
                    <h2 class="text-center mb-4">登录</h2>
                    <form action="{{ url_for('login') }}" method="post">
                        <div class="mb-3">
                            <label for="username" class="form-label">用户名</label>
                            <input type="text" class="form-control" id="username" name="username" required>
                        </div>
                        <div class="mb-3">
                            <label for="password" class="form-label">密码</label>
                            <input type="password" class="form-control" id="password" name="password" required>
                        </div>
                        <div class="d-grid gap-2">
                            <button type="submit" class="btn btn-primary btn-lg">登录</button>
                        </div>
                    </form>
                    <div class="text-center mt-3">
                        <p>还没有账号？ <a href="{{ url_for('register') }}">立即注册</a></p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %} 